package com.itheima.mapper;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CheckGroupCheckItemMapper {

    void add(Integer[] checkitemIds, Integer checkGroupId);

    @Delete("delete from t_checkgroup_checkitem where checkgroup_id=#{checkGroupId}")
    void deleteById(Integer checkGroupId);

    @Select("select checkitem_id from t_checkgroup_checkitem where checkgroup_id=#{checkGroupId}")
    List<Integer> findCheckItemIdsByCheckGroupId(Integer checkGroupId);
}
